package com.party.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.party.business.domain.TKcviewRecord;
import com.party.business.mapper.TKcviewRecordMapper;
import com.party.business.service.ITKcviewRecordService;
import com.party.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 课程学习记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-19
 */
@Service
public class TKcviewRecordServiceImpl extends ServiceImpl<TKcviewRecordMapper, TKcviewRecord>  implements ITKcviewRecordService
{
    @Autowired
    private TKcviewRecordMapper tKcviewRecordMapper;

    /**
     * 查询课程学习记录
     *
     * @param id 课程学习记录主键
     * @return 课程学习记录
     */
    @Override
    public TKcviewRecord selectTKcviewRecordById(String id)
    {
        return tKcviewRecordMapper.selectTKcviewRecordById(id);
    }

    /**
     * 查询课程学习记录列表
     *
     * @param tKcviewRecord 课程学习记录
     * @return 课程学习记录
     */
    @Override
    public List<TKcviewRecord> selectTKcviewRecordList(TKcviewRecord tKcviewRecord)
    {
        return tKcviewRecordMapper.selectTKcviewRecordList(tKcviewRecord);
    }

    /**
     * 新增课程学习记录
     *
     * @param tKcviewRecord 课程学习记录
     * @return 结果
     */
    @Override
    public int insertTKcviewRecord(TKcviewRecord tKcviewRecord)
    {
                tKcviewRecord.setCreateTime(DateUtils.getNowDate());
            return tKcviewRecordMapper.insertTKcviewRecord(tKcviewRecord);
    }

    /**
     * 修改课程学习记录
     *
     * @param tKcviewRecord 课程学习记录
     * @return 结果
     */
    @Override
    public int updateTKcviewRecord(TKcviewRecord tKcviewRecord)
    {
                tKcviewRecord.setUpdateTime(DateUtils.getNowDate());
        return tKcviewRecordMapper.updateTKcviewRecord(tKcviewRecord);
    }

    /**
     * 批量删除课程学习记录
     *
     * @param ids 需要删除的课程学习记录主键
     * @return 结果
     */
    @Override
    public int deleteTKcviewRecordByIds(String[] ids)
    {
        return tKcviewRecordMapper.deleteTKcviewRecordByIds(ids);
    }

    /**
     * 删除课程学习记录信息
     *
     * @param id 课程学习记录主键
     * @return 结果
     */
    @Override
    public int deleteTKcviewRecordById(String id)
    {
        return tKcviewRecordMapper.deleteTKcviewRecordById(id);
    }
}
